<template>


    <input type="checkbox" v-model="s1">果汁
    <input type="checkbox" v-model="s2">茶
    <input type="checkbox" v-model="s3">牛奶

    <div>
        选中选项为:[
        <span v-if="s1">"果汁"</span>
        <span v-if="s2">"茶"</span>
        <span v-if="s3">"牛奶"</span>
        ]
    </div>

</template>

<script setup>
import { ref } from 'vue'
const s1 = ref('')
const s2 = ref('')
const s3 = ref('')

</script>
